package tee;

public class TeeData {


    public static void main(String[] args) throws Exception {

        String dataset = "20013";

        String version = "2022V1";

        String appKey = "a1c0749ad0ab49fa909c24c39e875b90";

        String serviceIp = "api.jtcx.sh.cn";

        String port = "443";

        String nonce = RandomUtil.create32Uuid();
        String curTime = String.valueOf(System.currentTimeMillis() / 1000);
        String checkSum = TrafficDataUtils.getCheckSum("49f5d0ab", nonce, curTime);

        String queryUrl = String.format(TeeUrlConstants.TRAFFIC_DATA_URL, serviceIp, port, dataset, version, appKey, nonce, curTime, checkSum);

        HttpRequestUtil httpRequestUtil = new HttpRequestUtil();
        TrafficDataResponse response = httpRequestUtil.httpRequestGet(queryUrl, TrafficDataResponse.class);
        //保存记录
        System.out.println(response);
    }
}
